<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   《面向程序员的数据挖掘指南》——（五）进一步探索分类  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/8591.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466458079: Accept with keywords: (title(0.285714285714):指南,社区,分类,数盟,程序员,面向,数据挖掘, topn(0.433333333333):指南,分类,数盟,分类器,程序员,类别,测试集,文件,数据挖掘,交叉,准确率,加仑,面向,计算,文章,数据,效果,记录,评分,结果,篮球,矩阵,算法,运动员,随机,方法,代码,示例,距离,数据量).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    《面向程序员的数据挖掘指南》——（五）进一步探索分类
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    《面向程序员的数据挖掘指南》——（五）进一步探索分类 | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,73] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech/analysis">
       数据分析
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/8591.html">
          《面向程序员的数据挖掘指南》——（五）进一步探索分类
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          2,783 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech/analysis" rel="category tag">
          数据分析
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <p>
        作者：
        <a href="https://github.com/jizhang" rel="author">
         jizhang
        </a>
       </p>
       <blockquote>
        <p>
         <a data-original-title="" href="http://dataunion.org/?p=7965" title="">
          《面向程序员的数据挖掘指南》——（一）简介：数据挖掘是什么
         </a>
        </p>
        <p>
         <a data-original-title="" href="http://dataunion.org/?p=7989" title="">
          《面向程序员的数据挖掘指南》——（二）推荐系统入门
         </a>
        </p>
        <p>
         <a data-original-title="" href="http://dataunion.org/?p=8082" title="">
          《面向程序员的数据挖掘指南》——（三）隐式评价和基于物品的过滤算法
         </a>
        </p>
        <p>
         <a data-original-title="" href="http://dataunion.org/?p=8137" title="">
          《面向程序员的数据挖掘指南》——（四）分类
         </a>
        </p>
        <p>
         <a data-original-title="" href="http://dataunion.org/?p=8591" title="">
          《面向程序员的数据挖掘指南》——（五）进一步探索分类
         </a>
        </p>
        <p>
         <a href="http://dataunion.org/?p=8660">
          《面向程序员的数据挖掘指南》——（六）朴素贝叶斯和概率
         </a>
        </p>
        <p>
         <a href="http://dataunion.org/?p=8895">
          《面向程序员的数据挖掘指南》——（七）朴素贝叶斯和文本数据
         </a>
        </p>
        <p>
         <a href="http://dataunion.org/?p=9401">
          《面向程序员的数据挖掘指南》——（八）聚类
         </a>
        </p>
       </blockquote>
       <h2>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E6%95%88%E6%9E%9C%E8%AF%84%E4%BC%B0%E7%AE%97%E6%B3%95%E5%92%8Cknn" id="user-content-效果评估算法和knn">
        </a>
        效果评估算法和kNN
       </h2>
       <p>
        让我们回到
        <a href="http://dataunion.org/?p=8137">
         上一章
        </a>
        中运动项目的例子。
       </p>
       <p>
        <a href="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-110.png">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-110.png"/>
        </a>
       </p>
       <p>
        在那个例子中，我们编写了一个分类器程序，通过运动员的身高和体重来判断她参与的运动项目——体操、田径、篮球等。
       </p>
       <p>
        上图中的Marissa Coleman，身高6尺1寸，重160磅，我们的分类器可以正确的进行预测：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d444e856691002" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-k"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; cl &lt;span class="pl-k"&gt;=&lt;/span&gt; Classifier(&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;athletesTrainingSet.txt&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;)
&lt;span class="pl-k"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; cl.classify([&lt;span class="pl-c1"&gt;73&lt;/span&gt;, &lt;span class="pl-c1"&gt;160&lt;/span&gt;])
&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;Basketball&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d444e856691002-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d444e856691002-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d444e856691002-3">
                3
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d444e856691002-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 cl
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 Classifier
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;athletesTrainingSet.txt&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d444e856691002-2">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 cl
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 classify
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 73
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 160
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d444e856691002-3">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;Basketball&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0202 seconds] -->
       </div>
       <p>
        对于身高4尺9寸，90磅重的人：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d445f877932200" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-k"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; cl.classify([&lt;span class="pl-c1"&gt;59&lt;/span&gt;, &lt;span class="pl-c1"&gt;90&lt;/span&gt;])
&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;Gymnastics&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d445f877932200-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d445f877932200-2">
                2
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d445f877932200-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 cl
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 classify
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 59
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 90
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d445f877932200-2">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;Gymnastics&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0138 seconds] -->
       </div>
       <p>
        当我们构建完一个分类器后，应该问以下问题：
       </p>
       <ul class="task-list">
        <li>
         分类器的准确度如何？
        </li>
        <li>
         结果理想吗？
        </li>
        <li>
         如何与其它分类器做比较？
        </li>
       </ul>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-2.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-2.png"/>
        </a>
       </p>
       <h3>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E8%AE%AD%E7%BB%83%E9%9B%86%E5%92%8C%E6%B5%8B%E8%AF%95%E9%9B%86" id="user-content-训练集和测试集">
        </a>
        训练集和测试集
       </h3>
       <p>
        <a href="http://dataunion.org/?p=8137">
         上一章
        </a>
        我们一共引入了三个数据集，分别是女运动员、鸢尾花、加仑公里数。我们将这些数据集分为了两个部分，第一部分用来构造分类器，因此称为训练集；另一部分用来评估分类器的结果，因此称为测试集。训练集和测试集在数据挖掘中很常用。
       </p>
       <p>
        <em>
         数据挖掘工程师不会用同一个数据集去训练和测试程序。
        </em>
       </p>
       <p>
        因为如果使用训练集去测试分类器，得到的结果肯定是百分之百准确的。换种说法，在评价一个数据挖掘算法的效果时，如果用来测试的数据集是训练集本身的一个子集，那结果会极大程度趋向于好，所以这种做法不可取。
       </p>
       <p>
        将数据集拆分成一大一小两个部分的做法就产生了，前者用来训练，后者用来测试。不过，这种做法似乎也有问题：如果分割的时候不凑巧，就会引发异常。比如，若测试集中的篮球运动员恰巧都很矮，她们就会被归为马拉松运动员；如果又矮又轻，则会被归为体操运动员。使用这样的测试集会造成评分结果非常低。相反的情况也有可能出现，使评分结果趋于100%准确。无论哪种情况发生，都不是一种真实的评价。
       </p>
       <p>
        解决方法之一是将数据集按不同的方式拆分，测试多次，取结果的平均值。比如，我们将数据集拆为均等的两份：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-3.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-3.png"/>
        </a>
       </p>
       <p>
        我们可以先用第一部分做训练集，第二部分做测试集，然后再反过来，取两次测试的平均结果。我们还可以将数据集分成三份，用两个部分来做训练集，一个部分来做测试集，迭代三次：
       </p>
       <ol class="task-list">
        <li>
         使用Part 1和Part 2训练，使用Part 3测试；
        </li>
        <li>
         使用Part 1和Part 3训练，使用Part 2测试；
        </li>
        <li>
         使用Part 2和Part 3训练，使用Part 1测试；
        </li>
       </ol>
       <p>
        最后取三次测试的平均结果。
       </p>
       <p>
        在数据挖掘中，通常的做法是将数据集拆分成十份，并按上述方式进行迭代测试。因此这种方式也称为——
       </p>
       <h3>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E5%8D%81%E6%8A%98%E4%BA%A4%E5%8F%89%E9%AA%8C%E8%AF%81" id="user-content-十折交叉验证">
        </a>
        十折交叉验证
       </h3>
       <p>
        将数据集随机分割成十个等份，每次用9份数据做训练集，1份数据做测试集，如此迭代10次。
       </p>
       <p>
        我们来看一个示例：假设我有一个分类器能判断某个人是否是篮球运动员。我的数据集包含500个运动员和500个普通人。
       </p>
       <p>
        <strong>
         第一步：将数据分成10份
        </strong>
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-4.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-41.png"/>
        </a>
       </p>
       <p>
        每个桶中会放50个篮球运动员，50个普通人，一共100人。
       </p>
       <p>
        <strong>
         第二步：重复以下步骤10次
        </strong>
       </p>
       <ol class="task-list">
        <li>
         每次迭代我们保留一个桶，比如第一次迭代保留木桶1，第二次保留木桶2。
        </li>
        <li>
         我们使用剩余的9个桶来训练分类器，比如第一次迭代使用木桶2至10来训练。
        </li>
        <li>
         我们用刚才保留的一个桶来进行测试，并记录结果，比如：35个篮球运动员分类正确，29个普通人分类正确。
        </li>
       </ol>
       <p>
        <strong>
         第三步：合并结果
        </strong>
       </p>
       <p>
        我们可以用一张表格来展示结果：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-5.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-5.png"/>
        </a>
       </p>
       <p>
        500个篮球运动员中有372个人判断正确，500个普通人中有280个人判断正确，所以我们可以认为1000人中有652个人判断正确，准确率就是65.2%。通过十折交叉验证得到的评价结果肯定会比二折或者三折来得准确，毕竟我们使用了90%的数据进行训练，而非二折验证中的50%。
       </p>
       <blockquote>
        <p>
         好，既然十折交叉验证效果那么好，我们为何不做一个N折交叉验证？N即数据集中的数据量。
        </p>
        <p>
         如果我们有1000个数据，我们就用999个数据来训练分类器，再用它去判定剩下的一个数据。这样得到的验证效果应该是最好的。
        </p>
       </blockquote>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-6.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-6.png"/>
        </a>
       </p>
       <h2>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E7%95%99%E4%B8%80%E6%B3%95" id="user-content-留一法">
        </a>
        留一法
       </h2>
       <p>
        在数据挖掘领域，N折交叉验证又称为留一法。上面已经提到了留一法的优点之一：我们用几乎所有的数据进行训练，然后用一个数据进行测试。留一法的另一个优点是：确定性。
       </p>
       <h3>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E4%BB%80%E4%B9%88%E6%98%AF%E7%A1%AE%E5%AE%9A%E6%80%A7" id="user-content-什么是确定性">
        </a>
        什么是确定性？
       </h3>
       <p>
        试想Lucy花了一整周的时间编写了一个分类器。周五的时候她请两位同事（Emily和Li）来对这个分类器进行测试，并给了他们相同的数据集。这两位同事都使用十折交叉验证，结果是：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-7.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-7.png"/>
        </a>
       </p>
       <blockquote>
        <p>
         Emily：这个分类器的准确率是73.69%，很不错！
        </p>
        <p>
         Li：它的准确率只有71.27%。
        </p>
       </blockquote>
       <p>
        为什么她们的结果不一样？是某个人计算发生错误了吗？其实不是。在十折交叉验证中，我们需要将数据随机等分成十份，因此Emily和Li的分法很有可能是不一样的。这样一来，她们的训练集和测试集也都不相同了，得到的结果自然不同。即使是同一个人进行检验，如果两次使用了不同的分法，得到的结果也会有差异。因此，十折交叉验证是一种不确定的验证。相反，留一法得到的结果总是相同的，这是它的一个优点。
       </p>
       <h3>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E7%95%99%E4%B8%80%E6%B3%95%E7%9A%84%E7%BC%BA%E7%82%B9" id="user-content-留一法的缺点">
        </a>
        留一法的缺点
       </h3>
       <p>
        最大的缺点是计算时间很长。假设我们有一个包含1000条记录的数据集，使用十折交叉验证需要运行10分钟，而使用留一法则需要16个小时。如果我们的数据集更大，达到百万级，那检验的时间就更长了。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-8.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-8.png"/>
        </a>
       </p>
       <blockquote>
        <p>
         我两年后再给你检验结果！
        </p>
       </blockquote>
       <p>
        留一法的另一个缺点是分层问题。
       </p>
       <h3>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E5%88%86%E5%B1%82%E9%97%AE%E9%A2%98" id="user-content-分层问题">
        </a>
        分层问题
       </h3>
       <p>
        让我们回到运动员分类的例子——判断女运动员参与的项目是篮球、体操、还是田径。在训练分类器的时候，我们会试图让训练集包含全部三种类别。如果我们完全随机分配，训练集中有可能会不包含篮球运动员，在测试的时候就会影响结果。比如说，我们来构建一个包含100个运动员的数据集：从女子NBA网站上获取33名篮球运动员的信息，到Wikipedia上获取33个参加过2012奥运会体操项目的运动员，以及34名田径运动员的信息。这个数据集看起来是这样的：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-9.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-9.png"/>
        </a>
       </p>
       <p>
        现在我们来做十折交叉验证。我们按顺序将这些运动员放到10个桶中，所以前三个桶放的都是篮球运动员，第四个桶有篮球运动员也有体操运动员，以此类推。这样一来，没有一个桶能真正代表这个数据集的全貌。最好的方法是将不同类别的运动员按比例分发到各个桶中，这样每个桶都会包含三分之一篮球运动员、三分之一体操运动员、以及三分之一田径运动员。这种做法叫做分层。而在留一法中，所有的测试集都只包含一个数据。所以说，留一法对小数据集是合适的，但大多数情况下我们会选择十折交叉验证。
       </p>
       <h2>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E6%B7%B7%E6%B7%86%E7%9F%A9%E9%98%B5" id="user-content-混淆矩阵">
        </a>
        混淆矩阵
       </h2>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-10.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-10.png"/>
        </a>
       </p>
       <p>
        目前我们衡量分类器准确率的方式是使用以下公式：正确分类的记录数÷记录总数。有时我们会需要一个更为详细的评价结果，这时就会用到一个称为混淆矩阵的可视化表格。表格的行表示测试用例实际所属的类别，列则表示分类器的判断结果。
       </p>
       <p>
        混淆矩阵可以帮助我们快速识别出分类器到底在哪些类别上发生了混淆，因此得名。让我们看看运动员的示例，这个数据集中有300人，使用十折交叉验证，其混淆矩阵如下：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-11.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-11.png"/>
        </a>
       </p>
       <p>
        可以看到，100个体操运动员中有83人分类正确，17人被错误地分到了马拉松一列；92个篮球运动员分类正确，8人被分到了马拉松；85个马拉松运动员分类正确，9人被分到了体操，16人被分到了篮球。
       </p>
       <p>
        混淆矩阵的对角线（绿色字体）表示分类正确的人数，因此求得的准确率是：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-12.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-12.png"/>
        </a>
       </p>
       <p>
        从混淆矩阵中可以看出分类器的主要问题。在这个示例中，我们的分类器可以很好地区分体操运动员和篮球运动员，而马拉松运动员则比较容易和其他两个类别发生混淆。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-13.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-13.png"/>
        </a>
       </p>
       <blockquote>
        <p>
         怎样，是不是觉得混淆矩阵其实并不混淆呢？
        </p>
       </blockquote>
       <h2>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B" id="user-content-代码示例">
        </a>
        代码示例
       </h2>
       <p>
        让我们使用加仑公里数这个数据集，格式如下：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-14.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-14.png"/>
        </a>
       </p>
       <p>
        我会通过汽车的以下属性来判断它的加仑公里数：汽缸数、排气量、马力、重量、加速度。我将392条数据都存放在mpgData.txt文件中，并用下面这段
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/code/chapter-5/divide.py">
         Python代码
        </a>
        将这些数据按层次等分成十份：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d4472443165923" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-c"&gt;# -*- coding: utf-8 -*-&lt;/span&gt;

&lt;span class="pl-c"&gt;# 将数据等分成十份的示例代码&lt;/span&gt;

&lt;span class="pl-k"&gt;import&lt;/span&gt; random

&lt;span class="pl-st"&gt;def&lt;/span&gt; &lt;span class="pl-en"&gt;buckets&lt;/span&gt;(&lt;span class="pl-vpf"&gt;filename&lt;/span&gt;, &lt;span class="pl-vpf"&gt;bucketName&lt;/span&gt;, &lt;span class="pl-vpf"&gt;separator&lt;/span&gt;, &lt;span class="pl-vpf"&gt;classColumn&lt;/span&gt;):
    &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"""&lt;/span&gt;filename是源文件名&lt;/span&gt;
&lt;span class="pl-s1"&gt;    bucketName是十个目标文件的前缀名&lt;/span&gt;
&lt;span class="pl-s1"&gt;    separator是分隔符，如制表符、逗号等&lt;/span&gt;
&lt;span class="pl-s1"&gt;    classColumn是表示数据所属分类的那一列的序号&lt;span class="pl-pds"&gt;"""&lt;/span&gt;&lt;/span&gt;

    &lt;span class="pl-c"&gt;# 将数据分为10份&lt;/span&gt;
    numberOfBuckets &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-c1"&gt;10&lt;/span&gt;
    data &lt;span class="pl-k"&gt;=&lt;/span&gt; {}
    &lt;span class="pl-c"&gt;# 读取数据，并按分类放置&lt;/span&gt;
    &lt;span class="pl-k"&gt;with&lt;/span&gt; &lt;span class="pl-s3"&gt;open&lt;/span&gt;(filename) &lt;span class="pl-k"&gt;as&lt;/span&gt; f:
        lines &lt;span class="pl-k"&gt;=&lt;/span&gt; f.readlines()
    &lt;span class="pl-k"&gt;for&lt;/span&gt; line &lt;span class="pl-k"&gt;in&lt;/span&gt; lines:
        &lt;span class="pl-k"&gt;if&lt;/span&gt; separator &lt;span class="pl-k"&gt;!=&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;span class="pl-cce"&gt;\t&lt;/span&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;:
            line &lt;span class="pl-k"&gt;=&lt;/span&gt; line.replace(separator, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;span class="pl-cce"&gt;\t&lt;/span&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;)
        &lt;span class="pl-c"&gt;# 获取分类&lt;/span&gt;
        category &lt;span class="pl-k"&gt;=&lt;/span&gt; line.split()[classColumn]
        data.setdefault(category, [])
        data[category].append(line)
    &lt;span class="pl-c"&gt;# 初始化分桶&lt;/span&gt;
    buckets &lt;span class="pl-k"&gt;=&lt;/span&gt; []
    &lt;span class="pl-k"&gt;for&lt;/span&gt; i &lt;span class="pl-k"&gt;in&lt;/span&gt; &lt;span class="pl-s3"&gt;range&lt;/span&gt;(numberOfBuckets):
        buckets.append([])       
    &lt;span class="pl-c"&gt;# 将各个类别的数据均匀地放置到桶中&lt;/span&gt;
    &lt;span class="pl-k"&gt;for&lt;/span&gt; k &lt;span class="pl-k"&gt;in&lt;/span&gt; data.keys():
        &lt;span class="pl-c"&gt;# 打乱分类顺序&lt;/span&gt;
        random.shuffle(data[k])
        bNum &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-c1"&gt;0&lt;/span&gt;
        &lt;span class="pl-c"&gt;# 分桶&lt;/span&gt;
        &lt;span class="pl-k"&gt;for&lt;/span&gt; item &lt;span class="pl-k"&gt;in&lt;/span&gt; data[k]:
            buckets[bNum].append(item)
            bNum &lt;span class="pl-k"&gt;=&lt;/span&gt; (bNum &lt;span class="pl-k"&gt;+&lt;/span&gt; &lt;span class="pl-c1"&gt;1&lt;/span&gt;) &lt;span class="pl-k"&gt;%&lt;/span&gt; numberOfBuckets

    &lt;span class="pl-c"&gt;# 写入文件&lt;/span&gt;
    &lt;span class="pl-k"&gt;for&lt;/span&gt; bNum &lt;span class="pl-k"&gt;in&lt;/span&gt; &lt;span class="pl-s3"&gt;range&lt;/span&gt;(numberOfBuckets):
        f &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-s3"&gt;open&lt;/span&gt;(&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;span class="pl-c1"&gt;%s&lt;/span&gt;-&lt;span class="pl-c1"&gt;%02i&lt;/span&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-k"&gt;%&lt;/span&gt; (bucketName, bNum &lt;span class="pl-k"&gt;+&lt;/span&gt; &lt;span class="pl-c1"&gt;1&lt;/span&gt;), &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;w&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;)
        &lt;span class="pl-k"&gt;for&lt;/span&gt; item &lt;span class="pl-k"&gt;in&lt;/span&gt; buckets[bNum]:
            f.write(item)
        f.close()

&lt;span class="pl-c"&gt;# 调用示例      &lt;/span&gt;
buckets(&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;pimaSmall.txt&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;pimaSmall&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;,&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;,&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;,&lt;span class="pl-c1"&gt;8&lt;/span&gt;)
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-5">
                5
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-6">
                6
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-7">
                7
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-8">
                8
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-9">
                9
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-10">
                10
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-11">
                11
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-12">
                12
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-13">
                13
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-14">
                14
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-15">
                15
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-16">
                16
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-17">
                17
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-18">
                18
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-19">
                19
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-20">
                20
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-21">
                21
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-22">
                22
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-23">
                23
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-24">
                24
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-25">
                25
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-26">
                26
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-27">
                27
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-28">
                28
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-29">
                29
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-30">
                30
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-31">
                31
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-32">
                32
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-33">
                33
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-34">
                34
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-35">
                35
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-36">
                36
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-37">
                37
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-38">
                38
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-39">
                39
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-40">
                40
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-41">
                41
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-42">
                42
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-43">
                43
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-44">
                44
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-45">
                45
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-46">
                46
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4472443165923-47">
                47
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4472443165923-48">
                48
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # -*- coding: utf-8 -*-&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-2">
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-3">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 将数据等分成十份的示例代码&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-4">
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-5">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 import
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 random
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-6">
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-7">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 def
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 buckets
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 filename
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 bucketName
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 separator
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 classColumn
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-8">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 ""
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;filename是源文件名&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-9">
                <span class="crayon-s">
                 &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 s1
                </span>
                <span class="crayon-s">
                 "&gt;    bucketName是十个目标文件的前缀名&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-10">
                <span class="crayon-s">
                 &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 s1
                </span>
                <span class="crayon-s">
                 "&gt;    separator是分隔符，如制表符、逗号等&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-11">
                <span class="crayon-s">
                 &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 s1
                </span>
                <span class="crayon-s">
                 "&gt;    classColumn是表示数据所属分类的那一列的序号&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-s">
                 ""
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-12">
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-13">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 将数据分为10份&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-14">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 numberOfBuckets
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 10
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-15">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-16">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 读取数据，并按分类放置&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-17">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 with
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 open
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 filename
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 as
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-18">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 lines
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 readlines
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-19">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 line
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 lines
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-20">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 if
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 separator
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 !=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;&lt;span class="pl-cce"&gt;\t&lt;/span&gt;&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-21">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 line
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 line
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 replace
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 separator
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;&lt;span class="pl-cce"&gt;\t&lt;/span&gt;&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-22">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 获取分类&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-23">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 category
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 line
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 split
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 classColumn
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-24">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 setdefault
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 category
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-25">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 category
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 append
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 line
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-26">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 初始化分桶&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-27">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 buckets
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-28">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 range
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 numberOfBuckets
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-29">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 buckets
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 append
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-30">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 将各个类别的数据均匀地放置到桶中&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-31">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 k
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 keys
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-32">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 打乱分类顺序&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-33">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 random
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 shuffle
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 k
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-34">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bNum
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-35">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 分桶&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-36">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 item
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 k
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-37">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 buckets
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 bNum
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 append
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 item
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-38">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bNum
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 bNum
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 numberOfBuckets
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-39">
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-40">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 写入文件&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-41">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bNum
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 range
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 numberOfBuckets
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-42">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 open
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 c1
                </span>
                <span class="crayon-s">
                 "&gt;%s&lt;/span&gt;-&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 c1
                </span>
                <span class="crayon-s">
                 "&gt;%02i&lt;/span&gt;&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 bucketName
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bNum
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;w&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-43">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 item
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 buckets
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 bNum
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-44">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 write
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 item
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-45">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 close
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-46">
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4472443165923-47">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 调用示例      &lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4472443165923-48">
                <span class="crayon-e">
                 buckets
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;pimaSmall.txt&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;pimaSmall&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;,&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 8
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.1373 seconds] -->
       </div>
       <p>
        执行这个程序后会生成10个文件：mpgData01、mpgData02等。
       </p>
       <p>
        <strong>
         编程实践
        </strong>
       </p>
       <p>
        你能否修改上一章的
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/code/chapter-4/nearestNeighborClassifier.py#L188">
         近邻算法程序
        </a>
        ，让
        <code>
         test
        </code>
        函数能够执行十折交叉验证？输出的结果应该是这样的：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-15.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-15.png"/>
        </a>
       </p>
       <p>
        <strong>
         解决方案
        </strong>
       </p>
       <p>
        我们需要进行以下几步：
       </p>
       <ul class="task-list">
        <li>
         修改初始化方法，只读取九个桶中的数据作为训练集；
        </li>
        <li>
         增加一个方法，从第十个桶中读取测试集；
        </li>
        <li>
         执行十折交叉验证。
        </li>
       </ul>
       <p>
        下面我们分步来看：
       </p>
       <ul class="task-list">
        <li>
         初始化方法
         <code>
          __init__
         </code>
        </li>
       </ul>
       <p>
        <code>
         __init__
        </code>
        方法的签名会修改成以下形式：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d4480566019605" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-st"&gt;def&lt;/span&gt; &lt;span class="pl-en"&gt;&lt;span class="pl-s3"&gt;__init__&lt;/span&gt;&lt;/span&gt;(&lt;span class="pl-vpf"&gt;self&lt;/span&gt;, &lt;span class="pl-vpf"&gt;bucketPrefix&lt;/span&gt;, &lt;span class="pl-vpf"&gt;testBucketNumber&lt;/span&gt;, &lt;span class="pl-vpf"&gt;dataFormat&lt;/span&gt;):
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d4480566019605-1">
                1
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d4480566019605-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 def
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 __init__
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 testBucketNumber
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 dataFormat
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0034 seconds] -->
       </div>
       <p>
        每个桶的文件名是mpgData-01、mpgData-02这样的形式，所以
        <code>
         bucketPrefix
        </code>
        就是“mpgData”。
        <code>
         testBucketNumber
        </code>
        是测试集所用的桶，如果是3，则分类器会使用1、2、4-9的桶进行训练。
        <code>
         dataFormat
        </code>
        用来指定数据集的格式，如：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d4487758159357" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          class    num    num    num    num    num    comment
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685fc1d4487758159357-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4487758159357-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685fc1d4487758159357-1">
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                num
               </span>
               <span class="crayon-e">
                num
               </span>
               <span class="crayon-e">
                num
               </span>
               <span class="crayon-e">
                num
               </span>
               <span class="crayon-e">
                num
               </span>
               <span class="crayon-i">
                comment
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4487758159357-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0009 seconds] -->
       <p>
        意味着第一列是所属分类，后五列是特征值，最后一列是备注信息。
       </p>
       <p>
        以下是初始化方法的示例代码：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d448d887819816" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-st"&gt;class&lt;/span&gt; &lt;span class="pl-en"&gt;Classifier&lt;/span&gt;:

    &lt;span class="pl-st"&gt;def&lt;/span&gt; &lt;span class="pl-en"&gt;&lt;span class="pl-s3"&gt;__init__&lt;/span&gt;&lt;/span&gt;(&lt;span class="pl-vpf"&gt;self&lt;/span&gt;, &lt;span class="pl-vpf"&gt;bucketPrefix&lt;/span&gt;, &lt;span class="pl-vpf"&gt;testBucketNumber&lt;/span&gt;, &lt;span class="pl-vpf"&gt;dataFormat&lt;/span&gt;):
        &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"""&lt;/span&gt;该分类器程序将从bucketPrefix指定的一系列文件中读取数据，&lt;/span&gt;
&lt;span class="pl-s1"&gt;        并留出testBucketNumber指定的桶来做测试集，其余的做训练集。&lt;/span&gt;
&lt;span class="pl-s1"&gt;        dataFormat用来表示数据的格式，如：&lt;/span&gt;
&lt;span class="pl-s1"&gt;        "class    num    num    num    num    num    comment"&lt;/span&gt;
&lt;span class="pl-s1"&gt;    &lt;span class="pl-pds"&gt;"""&lt;/span&gt;&lt;/span&gt;

        &lt;span class="pl-v"&gt;self&lt;/span&gt;.medianAndDeviation &lt;span class="pl-k"&gt;=&lt;/span&gt; []

        &lt;span class="pl-c"&gt;# 从文件中读取文件&lt;/span&gt;

        &lt;span class="pl-v"&gt;self&lt;/span&gt;.format &lt;span class="pl-k"&gt;=&lt;/span&gt; dataFormat.strip().split(&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;span class="pl-cce"&gt;\t&lt;/span&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;)
        &lt;span class="pl-v"&gt;self&lt;/span&gt;.data &lt;span class="pl-k"&gt;=&lt;/span&gt; []
        &lt;span class="pl-c"&gt;# 用1-10来标记桶&lt;/span&gt;
        &lt;span class="pl-k"&gt;for&lt;/span&gt; i &lt;span class="pl-k"&gt;in&lt;/span&gt; &lt;span class="pl-s3"&gt;range&lt;/span&gt;(&lt;span class="pl-c1"&gt;1&lt;/span&gt;, &lt;span class="pl-c1"&gt;11&lt;/span&gt;):
            &lt;span class="pl-c"&gt;# 判断该桶是否包含在训练集中&lt;/span&gt;
            &lt;span class="pl-k"&gt;if&lt;/span&gt; i &lt;span class="pl-k"&gt;!=&lt;/span&gt; testBucketNumber:
                filename &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;span class="pl-c1"&gt;%s&lt;/span&gt;-&lt;span class="pl-c1"&gt;%02i&lt;/span&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-k"&gt;%&lt;/span&gt; (bucketPrefix, i)
                f &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-s3"&gt;open&lt;/span&gt;(filename)
                lines &lt;span class="pl-k"&gt;=&lt;/span&gt; f.readlines()
                f.close()
                &lt;span class="pl-k"&gt;for&lt;/span&gt; line &lt;span class="pl-k"&gt;in&lt;/span&gt; lines[&lt;span class="pl-c1"&gt;1&lt;/span&gt;:]:
                    fields &lt;span class="pl-k"&gt;=&lt;/span&gt; line.strip().split(&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;span class="pl-cce"&gt;\t&lt;/span&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;)
                    ignore &lt;span class="pl-k"&gt;=&lt;/span&gt; []
                    vector &lt;span class="pl-k"&gt;=&lt;/span&gt; []
                    &lt;span class="pl-k"&gt;for&lt;/span&gt; i &lt;span class="pl-k"&gt;in&lt;/span&gt; &lt;span class="pl-s3"&gt;range&lt;/span&gt;(&lt;span class="pl-s3"&gt;len&lt;/span&gt;(fields)):
                        &lt;span class="pl-k"&gt;if&lt;/span&gt; &lt;span class="pl-v"&gt;self&lt;/span&gt;.format[i] &lt;span class="pl-k"&gt;==&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;num&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;:
                            vector.append(&lt;span class="pl-s3"&gt;float&lt;/span&gt;(fields[i]))
                        &lt;span class="pl-k"&gt;elif&lt;/span&gt; &lt;span class="pl-v"&gt;self&lt;/span&gt;.format[i] &lt;span class="pl-k"&gt;==&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;comment&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;:
                            ignore.append(fields[i])
                        &lt;span class="pl-k"&gt;elif&lt;/span&gt; &lt;span class="pl-v"&gt;self&lt;/span&gt;.format[i] &lt;span class="pl-k"&gt;==&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;class&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;:
                            classification &lt;span class="pl-k"&gt;=&lt;/span&gt; fields[i]
                    &lt;span class="pl-v"&gt;self&lt;/span&gt;.data.append((classification, vector, ignore))
        &lt;span class="pl-v"&gt;self&lt;/span&gt;.rawData &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-s3"&gt;list&lt;/span&gt;(&lt;span class="pl-v"&gt;self&lt;/span&gt;.data)
        &lt;span class="pl-c"&gt;# 获取特征向量的长度&lt;/span&gt;
        &lt;span class="pl-v"&gt;self&lt;/span&gt;.vlen &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-s3"&gt;len&lt;/span&gt;(&lt;span class="pl-v"&gt;self&lt;/span&gt;.data[&lt;span class="pl-c1"&gt;0&lt;/span&gt;][&lt;span class="pl-c1"&gt;1&lt;/span&gt;])
        &lt;span class="pl-c"&gt;# 标准化数据&lt;/span&gt;
        &lt;span class="pl-k"&gt;for&lt;/span&gt; i &lt;span class="pl-k"&gt;in&lt;/span&gt; &lt;span class="pl-s3"&gt;range&lt;/span&gt;(&lt;span class="pl-v"&gt;self&lt;/span&gt;.vlen):
            &lt;span class="pl-v"&gt;self&lt;/span&gt;.normalizeColumn(i)
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-5">
                5
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-6">
                6
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-7">
                7
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-8">
                8
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-9">
                9
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-10">
                10
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-11">
                11
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-12">
                12
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-13">
                13
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-14">
                14
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-15">
                15
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-16">
                16
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-17">
                17
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-18">
                18
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-19">
                19
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-20">
                20
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-21">
                21
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-22">
                22
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-23">
                23
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-24">
                24
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-25">
                25
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-26">
                26
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-27">
                27
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-28">
                28
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-29">
                29
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-30">
                30
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-31">
                31
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-32">
                32
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-33">
                33
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-34">
                34
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-35">
                35
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-36">
                36
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-37">
                37
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-38">
                38
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-39">
                39
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d448d887819816-40">
                40
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d448d887819816-41">
                41
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 Classifier
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-2">
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-3">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 def
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 __init__
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 testBucketNumber
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 dataFormat
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-4">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 ""
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;该分类器程序将从bucketPrefix指定的一系列文件中读取数据，&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-5">
                <span class="crayon-s">
                 &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 s1
                </span>
                <span class="crayon-s">
                 "&gt;        并留出testBucketNumber指定的桶来做测试集，其余的做训练集。&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-6">
                <span class="crayon-s">
                 &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 s1
                </span>
                <span class="crayon-s">
                 "&gt;        dataFormat用来表示数据的格式，如：&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-7">
                <span class="crayon-s">
                 &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 s1
                </span>
                <span class="crayon-s">
                 "&gt;        "
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 num
                </span>
                <span class="crayon-e">
                 num
                </span>
                <span class="crayon-e">
                 num
                </span>
                <span class="crayon-e">
                 num
                </span>
                <span class="crayon-e">
                 num
                </span>
                <span class="crayon-i">
                 comment
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-8">
                <span class="crayon-s">
                 &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 s1
                </span>
                <span class="crayon-s">
                 "&gt;    &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-s">
                 ""
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-9">
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-10">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 medianAndDeviation
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-11">
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-12">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 从文件中读取文件&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-13">
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-14">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 format
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 dataFormat
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 strip
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 split
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;&lt;span class="pl-cce"&gt;\t&lt;/span&gt;&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-15">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-16">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 用1-10来标记桶&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-17">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 range
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 11
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-18">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 判断该桶是否包含在训练集中&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-19">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 if
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 !=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 testBucketNumber
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-20">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 filename
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 c1
                </span>
                <span class="crayon-s">
                 "&gt;%s&lt;/span&gt;-&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 c1
                </span>
                <span class="crayon-s">
                 "&gt;%02i&lt;/span&gt;&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-21">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 open
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 filename
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-22">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 lines
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 readlines
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-23">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 close
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-24">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 line
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 lines
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-25">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 fields
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 line
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 strip
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 split
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;&lt;span class="pl-cce"&gt;\t&lt;/span&gt;&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-26">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ignore
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-27">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 vector
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-28">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 range
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 len
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 fields
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-29">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 if
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 format
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;num&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-30">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 vector
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 append
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 float
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 fields
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-31">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 elif
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 format
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;comment&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-32">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ignore
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 append
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 fields
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-33">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 elif
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 format
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;class&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-34">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 classification
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 fields
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-35">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 append
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 classification
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 vector
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ignore
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-36">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 rawData
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 list
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-37">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 获取特征向量的长度&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-38">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 vlen
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 len
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-39">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 标准化数据&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d448d887819816-40">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 range
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 vlen
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d448d887819816-41">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 normalizeColumn
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.1315 seconds] -->
       </div>
       <ul class="task-list">
        <li>
         testBucket方法
        </li>
       </ul>
       <p>
        下面的方法会使用一个桶的数据进行测试：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d4498166223218" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-st"&gt;def&lt;/span&gt; &lt;span class="pl-en"&gt;testBucket&lt;/span&gt;(&lt;span class="pl-vpf"&gt;self&lt;/span&gt;, &lt;span class="pl-vpf"&gt;bucketPrefix&lt;/span&gt;, &lt;span class="pl-vpf"&gt;bucketNumber&lt;/span&gt;):
    &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"""&lt;/span&gt;读取bucketPrefix-bucketNumber所指定的文件作为测试集&lt;span class="pl-pds"&gt;"""&lt;/span&gt;&lt;/span&gt;

    filename &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;span class="pl-c1"&gt;%s&lt;/span&gt;-&lt;span class="pl-c1"&gt;%02i&lt;/span&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-k"&gt;%&lt;/span&gt; (bucketPrefix, bucketNumber)
    f &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-s3"&gt;open&lt;/span&gt;(filename)
    lines &lt;span class="pl-k"&gt;=&lt;/span&gt; f.readlines()
    totals &lt;span class="pl-k"&gt;=&lt;/span&gt; {}
    f.close()
    &lt;span class="pl-k"&gt;for&lt;/span&gt; line &lt;span class="pl-k"&gt;in&lt;/span&gt; lines:
        data &lt;span class="pl-k"&gt;=&lt;/span&gt; line.strip().split(&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;span class="pl-cce"&gt;\t&lt;/span&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;)
        vector &lt;span class="pl-k"&gt;=&lt;/span&gt; []
        classInColumn &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-k"&gt;-&lt;/span&gt;&lt;span class="pl-c1"&gt;1&lt;/span&gt;
        &lt;span class="pl-k"&gt;for&lt;/span&gt; i &lt;span class="pl-k"&gt;in&lt;/span&gt; &lt;span class="pl-s3"&gt;range&lt;/span&gt;(&lt;span class="pl-s3"&gt;len&lt;/span&gt;(&lt;span class="pl-v"&gt;self&lt;/span&gt;.format)):
              &lt;span class="pl-k"&gt;if&lt;/span&gt; &lt;span class="pl-v"&gt;self&lt;/span&gt;.format[i] &lt;span class="pl-k"&gt;==&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;num&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;:
                  vector.append(&lt;span class="pl-s3"&gt;float&lt;/span&gt;(data[i]))
              &lt;span class="pl-k"&gt;elif&lt;/span&gt; &lt;span class="pl-v"&gt;self&lt;/span&gt;.format[i] &lt;span class="pl-k"&gt;==&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;class&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;:
                  classInColumn &lt;span class="pl-k"&gt;=&lt;/span&gt; i
        theRealClass &lt;span class="pl-k"&gt;=&lt;/span&gt; data[classInColumn]
        classifiedAs &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-v"&gt;self&lt;/span&gt;.classify(vector)
        totals.setdefault(theRealClass, {})
        totals[theRealClass].setdefault(classifiedAs, &lt;span class="pl-c1"&gt;0&lt;/span&gt;)
        totals[theRealClass][classifiedAs] &lt;span class="pl-k"&gt;+=&lt;/span&gt; &lt;span class="pl-c1"&gt;1&lt;/span&gt;
    &lt;span class="pl-k"&gt;return&lt;/span&gt; totals
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-5">
                5
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-6">
                6
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-7">
                7
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-8">
                8
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-9">
                9
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-10">
                10
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-11">
                11
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-12">
                12
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-13">
                13
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-14">
                14
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-15">
                15
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-16">
                16
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-17">
                17
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-18">
                18
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-19">
                19
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-20">
                20
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-21">
                21
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d4498166223218-22">
                22
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d4498166223218-23">
                23
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 def
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 testBucket
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 bucketNumber
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-2">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 ""
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;读取bucketPrefix-bucketNumber所指定的文件作为测试集&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-s">
                 ""
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-3">
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-4">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 filename
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 c1
                </span>
                <span class="crayon-s">
                 "&gt;%s&lt;/span&gt;-&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 c1
                </span>
                <span class="crayon-s">
                 "&gt;%02i&lt;/span&gt;&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bucketNumber
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-5">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 open
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 filename
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-6">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 lines
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 readlines
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-7">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 totals
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-8">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 f
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 close
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-9">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 line
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 lines
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-10">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 line
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 strip
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 split
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;&lt;span class="pl-cce"&gt;\t&lt;/span&gt;&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-11">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 vector
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-12">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 classInColumn
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-13">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 range
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 len
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 format
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-14">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 if
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 format
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;num&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-15">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 vector
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 append
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 float
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-16">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 elif
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 format
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;class&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-17">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 classInColumn
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-i">
                 i
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-18">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 theRealClass
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 classInColumn
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-19">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 classifiedAs
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 classify
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 vector
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-20">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 totals
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 setdefault
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 theRealClass
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-21">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 totals
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 theRealClass
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 setdefault
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 classifiedAs
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d4498166223218-22">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 totals
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 theRealClass
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 classifiedAs
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d4498166223218-23">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 return
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 totals
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0592 seconds] -->
       </div>
       <p>
        比如说bucketPrefix是mpgData，bucketNumber是3，那么程序会从mpgData-03中读取内容，作为测试集。这个方法会返回如下形式的结果：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d44a2901823413" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           {&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;35&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: {&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;35&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;1&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;20&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;1&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;30&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;1&lt;/span&gt;},
 &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;40&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: {&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;30&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;1&lt;/span&gt;},
 &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;30&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: {&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;35&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;3&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;30&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;1&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;45&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;1&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;25&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;1&lt;/span&gt;},
 &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;15&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: {&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;20&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;3&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;15&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;4&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;10&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;1&lt;/span&gt;},
 &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;10&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: {&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;15&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;1&lt;/span&gt;},
 &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;20&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: {&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;15&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;2&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;20&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;4&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;30&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;2&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;25&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;1&lt;/span&gt;},
 &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;25&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: {&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;30&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;5&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;25&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;: &lt;span class="pl-c1"&gt;3&lt;/span&gt;}}
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d44a2901823413-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44a2901823413-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44a2901823413-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44a2901823413-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44a2901823413-5">
                5
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44a2901823413-6">
                6
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44a2901823413-7">
                7
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d44a2901823413-1">
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;35&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;35&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;20&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;30&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44a2901823413-2">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;40&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;30&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44a2901823413-3">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;30&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;35&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 3
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;30&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;45&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;25&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44a2901823413-4">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;15&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;20&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 3
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;15&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 4
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;10&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44a2901823413-5">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;10&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;15&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44a2901823413-6">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;20&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;15&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 2
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;20&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 4
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;30&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 2
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;25&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44a2901823413-7">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;25&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;30&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 5
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 '&lt;/span&gt;25&lt;span class="pl-pds"&gt;'
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 3
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0264 seconds] -->
       </div>
       <p>
        这个字段的键表示真实类别。如第一行的35表示该行数据的真实类别是35加仑公里。这个键又对应一个字典，这个字典表示的是分类器所判断的类别，如：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d44ab833922468" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          '15': {'20': 3, '15': 4, '10': 1},
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685fc1d44ab833922468-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44ab833922468-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685fc1d44ab833922468-1">
               <span class="crayon-s">
                '15'
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-s">
                '20'
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                3
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                '15'
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                4
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                '10'
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44ab833922468-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0010 seconds] -->
       <p>
        其中的3表示有3条记录真实类别是15加仑公里，但被分类到了20加仑公里；4表示分类正确的记录数；1表示被分到10加仑公里的记录数。
       </p>
       <ul class="task-list">
        <li>
         执行十折交叉验证
        </li>
       </ul>
       <p>
        最后我们需要编写一段程序来执行十折交叉验证，也就是说要用不同的训练集和测试集来构建10个分类器。
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d44b2454186932" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-st"&gt;def&lt;/span&gt; &lt;span class="pl-en"&gt;tenfold&lt;/span&gt;(&lt;span class="pl-vpf"&gt;bucketPrefix&lt;/span&gt;, &lt;span class="pl-vpf"&gt;dataFormat&lt;/span&gt;):
    results &lt;span class="pl-k"&gt;=&lt;/span&gt; {}
    &lt;span class="pl-k"&gt;for&lt;/span&gt; i &lt;span class="pl-k"&gt;in&lt;/span&gt; &lt;span class="pl-s3"&gt;range&lt;/span&gt;(&lt;span class="pl-c1"&gt;1&lt;/span&gt;, &lt;span class="pl-c1"&gt;11&lt;/span&gt;):
        c &lt;span class="pl-k"&gt;=&lt;/span&gt; Classifier(bucketPrefix, i, dataFormat)
        t &lt;span class="pl-k"&gt;=&lt;/span&gt; c.testBucket(bucketPrefix, i)
        &lt;span class="pl-k"&gt;for&lt;/span&gt; (key, value) &lt;span class="pl-k"&gt;in&lt;/span&gt; t.items():
            results.setdefault(key, {})
            &lt;span class="pl-k"&gt;for&lt;/span&gt; (ckey, cvalue) &lt;span class="pl-k"&gt;in&lt;/span&gt; value.items():
                results[key].setdefault(ckey, &lt;span class="pl-c1"&gt;0&lt;/span&gt;)
                results[key][ckey] &lt;span class="pl-k"&gt;+=&lt;/span&gt; cvalue

    &lt;span class="pl-c"&gt;# 输出结果&lt;/span&gt;
    categories &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-s3"&gt;list&lt;/span&gt;(results.keys())
    categories.sort()
    &lt;span class="pl-k"&gt;print&lt;/span&gt;(   &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;span class="pl-cce"&gt;\n&lt;/span&gt;       Classified as: &lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;)
    header &lt;span class="pl-k"&gt;=&lt;/span&gt;    &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;        &lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;
    subheader &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;      +&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;
    &lt;span class="pl-k"&gt;for&lt;/span&gt; category &lt;span class="pl-k"&gt;in&lt;/span&gt; categories:
        header &lt;span class="pl-k"&gt;+=&lt;/span&gt; category &lt;span class="pl-k"&gt;+&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;   &lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;
        subheader &lt;span class="pl-k"&gt;+=&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;----+&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;
    &lt;span class="pl-k"&gt;print&lt;/span&gt; (header)
    &lt;span class="pl-k"&gt;print&lt;/span&gt; (subheader)
    total &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-c1"&gt;0.0&lt;/span&gt;
    correct &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-c1"&gt;0.0&lt;/span&gt;
    &lt;span class="pl-k"&gt;for&lt;/span&gt; category &lt;span class="pl-k"&gt;in&lt;/span&gt; categories:
        row &lt;span class="pl-k"&gt;=&lt;/span&gt; category &lt;span class="pl-k"&gt;+&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;    |&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;
        &lt;span class="pl-k"&gt;for&lt;/span&gt; c2 &lt;span class="pl-k"&gt;in&lt;/span&gt; categories:
            &lt;span class="pl-k"&gt;if&lt;/span&gt; c2 &lt;span class="pl-k"&gt;in&lt;/span&gt; results[category]:
                count &lt;span class="pl-k"&gt;=&lt;/span&gt; results[category][c2]
            &lt;span class="pl-k"&gt;else&lt;/span&gt;:
                count &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-c1"&gt;0&lt;/span&gt;
            row &lt;span class="pl-k"&gt;+=&lt;/span&gt; &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt; &lt;span class="pl-c1"&gt;%2i&lt;/span&gt; |&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-k"&gt;%&lt;/span&gt; count
            total &lt;span class="pl-k"&gt;+=&lt;/span&gt; count
            &lt;span class="pl-k"&gt;if&lt;/span&gt; c2 &lt;span class="pl-k"&gt;==&lt;/span&gt; category:
                correct &lt;span class="pl-k"&gt;+=&lt;/span&gt; count
        &lt;span class="pl-k"&gt;print&lt;/span&gt;(row)
    &lt;span class="pl-k"&gt;print&lt;/span&gt;(subheader)
    &lt;span class="pl-k"&gt;print&lt;/span&gt;(&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;span class="pl-cce"&gt;\n&lt;/span&gt;&lt;span class="pl-c1"&gt;%5.3f&lt;/span&gt; percent correct&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-k"&gt;%&lt;/span&gt;((correct &lt;span class="pl-k"&gt;*&lt;/span&gt; &lt;span class="pl-c1"&gt;100&lt;/span&gt;) &lt;span class="pl-k"&gt;/&lt;/span&gt; total))
    &lt;span class="pl-k"&gt;print&lt;/span&gt;(&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;total of &lt;span class="pl-c1"&gt;%i&lt;/span&gt; instances&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-k"&gt;%&lt;/span&gt; total)

&lt;span class="pl-c"&gt;# 调用方法&lt;/span&gt;
tenfold(&lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;mpgData/mpgData&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;,        &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;class    num num num num num comment&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;)
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-5">
                5
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-6">
                6
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-7">
                7
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-8">
                8
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-9">
                9
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-10">
                10
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-11">
                11
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-12">
                12
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-13">
                13
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-14">
                14
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-15">
                15
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-16">
                16
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-17">
                17
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-18">
                18
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-19">
                19
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-20">
                20
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-21">
                21
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-22">
                22
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-23">
                23
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-24">
                24
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-25">
                25
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-26">
                26
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-27">
                27
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-28">
                28
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-29">
                29
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-30">
                30
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-31">
                31
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-32">
                32
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-33">
                33
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-34">
                34
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-35">
                35
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-36">
                36
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-37">
                37
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-38">
                38
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-39">
                39
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-40">
                40
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44b2454186932-41">
                41
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44b2454186932-42">
                42
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 def
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 tenfold
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 dataFormat
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-2">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-3">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 range
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 11
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-4">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 c
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 Classifier
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 dataFormat
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-5">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 t
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 c
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 testBucket
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-6">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 key
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 value
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 t
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 items
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-7">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 setdefault
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 key
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-8">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ckey
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 cvalue
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 value
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 items
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-9">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 key
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 setdefault
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ckey
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-10">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 key
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 ckey
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 cvalue
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-11">
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-12">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 输出结果&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-13">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 categories
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 list
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 keys
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-14">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 categories
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 sort
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-15">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 print
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 cce
                </span>
                <span class="crayon-s">
                 "&gt;\n&lt;/span&gt;       Classified as: &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-16">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 header
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;        &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-17">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 subheader
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;      +&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-18">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 category
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 categories
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-19">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 header
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 category
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;   &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-20">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 subheader
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;----+&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-21">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 print
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 header
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-22">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 print
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 subheader
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-23">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 total
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-24">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 correct
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-25">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 category
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 categories
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-26">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 row
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 category
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;    |&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-27">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 c2
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 categories
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-28">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 if
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 c2
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 category
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-29">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 count
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 category
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 c2
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-30">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 else
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-31">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 count
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-32">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 row
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt; &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 c1
                </span>
                <span class="crayon-s">
                 "&gt;%2i&lt;/span&gt; |&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 count
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-33">
                <span class="crayon-e">
                </span>
                <span class="crayon-v">
                 total
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 count
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-34">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 if
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 c2
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 category
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-35">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 correct
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 count
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-36">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 print
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 row
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-37">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 print
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 subheader
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-38">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 print
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 cce
                </span>
                <span class="crayon-s">
                 "&gt;\n&lt;/span&gt;&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 c1
                </span>
                <span class="crayon-s">
                 "&gt;%5.3f&lt;/span&gt; percent correct&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 correct
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 *
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 100
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 total
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-39">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 print
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;total of &lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 c1
                </span>
                <span class="crayon-s">
                 "&gt;%i&lt;/span&gt; instances&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 total
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-40">
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44b2454186932-41">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 调用方法&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44b2454186932-42">
                <span class="crayon-e">
                 tenfold
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;mpgData/mpgData&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;class    num num num num num comment&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0411 seconds] -->
       </div>
       <p>
        执行结果如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d44bc145958147" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          Classified as: 
        10   15   20   25   30   35   40   45   
      +----+----+----+----+----+----+----+----+
10    |  3 | 10 |  0 |  0 |  0 |  0 |  0 |  0 |
15    |  3 | 68 | 14 |  1 |  0 |  0 |  0 |  0 |
20    |  0 | 14 | 66 |  9 |  5 |  1 |  1 |  0 |
25    |  0 |  1 | 14 | 35 | 21 |  6 |  1 |  1 |
30    |  0 |  1 |  3 | 17 | 21 | 14 |  5 |  2 |
35    |  0 |  0 |  2 |  8 |  9 | 14 |  4 |  1 |
40    |  0 |  0 |  1 |  0 |  5 |  5 |  0 |  0 |
45    |  0 |  0 |  0 |  2 |  1 |  1 |  0 |  2 |
      +----+----+----+----+----+----+----+----+

53.316 percent correct
total of 392 instances
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57685fc1d44bc145958147-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44bc145958147-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57685fc1d44bc145958147-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44bc145958147-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57685fc1d44bc145958147-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44bc145958147-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57685fc1d44bc145958147-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44bc145958147-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57685fc1d44bc145958147-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44bc145958147-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57685fc1d44bc145958147-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44bc145958147-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57685fc1d44bc145958147-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44bc145958147-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57685fc1d44bc145958147-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44bc145958147-16">
               16
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57685fc1d44bc145958147-1">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Classified
               </span>
               <span class="crayon-st">
                as
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44bc145958147-2">
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                15
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                20
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                25
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                30
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                35
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                40
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                45
               </span>
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685fc1d44bc145958147-3">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44bc145958147-4">
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                3
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685fc1d44bc145958147-5">
               <span class="crayon-cn">
                15
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                3
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                68
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44bc145958147-6">
               <span class="crayon-cn">
                20
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                66
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                9
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685fc1d44bc145958147-7">
               <span class="crayon-cn">
                25
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                35
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                21
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                6
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44bc145958147-8">
               <span class="crayon-cn">
                30
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                3
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                17
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                21
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685fc1d44bc145958147-9">
               <span class="crayon-cn">
                35
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                8
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                9
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                4
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44bc145958147-10">
               <span class="crayon-cn">
                40
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685fc1d44bc145958147-11">
               <span class="crayon-cn">
                45
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44bc145958147-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                +
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685fc1d44bc145958147-13">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44bc145958147-14">
               <span class="crayon-cn">
                53.316
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                percent
               </span>
               <span class="crayon-e">
                correct
               </span>
              </div>
              <div class="crayon-line" id="crayon-57685fc1d44bc145958147-15">
               <span class="crayon-e">
                total
               </span>
               <span class="crayon-i">
                of
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                392
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                instances
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44bc145958147-16">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0120 seconds] -->
       <p>
        可以在这里下载
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/code/chapter-5/crossValidation.py">
         代码
        </a>
        和
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/code/chapter-5/mpgData.zip">
         数据集
        </a>
        。
       </p>
       <h2>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#kappa%E6%8C%87%E6%A0%87" id="user-content-kappa指标">
        </a>
        Kappa指标
       </h2>
       <p>
        本章的开头我们对分类器的效果提了几个问题，并在此之后使用十折交叉验证和混淆矩阵来对分类器进行评估。上一节中我们对加仑公里数分类器的评价结果是53.316%的正确率，那这个结果是好是坏呢？我们就需要使用一个新的指标：Kappa指标。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-16.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-16.png"/>
        </a>
       </p>
       <p>
        Kappa指标可以用来评价分类器的效果比随机分类要好多少。我们仍用运动员的例子来说明，以下是它的混淆矩阵：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-17.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-17.png"/>
        </a>
       </p>
       <p>
        我增加了“合计”一列，因此在计算正确率时，我们只需将对角线相加（35 + 88 + 28 = 151）除以合计（200）就可以了，结果是0.755。
       </p>
       <p>
        现在，我们建造另一个混淆矩阵，用来表示随机分类的结果。首先，我们将上表中的数据抹去一部分，只留下合计：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-18.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-18.png"/>
        </a>
       </p>
       <p>
        从最后一行可以看到，我们之前构造的分类器将50%的运动员分类到篮球运动员中（200中的100人），20%分到了体操，剩余30%分到了马拉松。即：
       </p>
       <ul class="task-list">
        <li>
         体操 20%
        </li>
        <li>
         篮球 50%
        </li>
        <li>
         田径 30%
        </li>
       </ul>
       <p>
        我们会用这个百分比来构造随机分类器的混淆矩阵。比如，真实的体操运动员一共有60人，随机分类器会将其中的20%（12人）分类为体操，50%（30人）分类为篮球，30%（18人）分类为马拉松，填入表格：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-19.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-19.png"/>
        </a>
       </p>
       <p>
        继续用这种方法填充空白。100个真实的篮球运动员，20%（20人）分到体操，50%（50人）分到篮球，30%（30人）分到马拉松。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-20.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-20.png"/>
        </a>
       </p>
       <p>
        从而得到随机分类器的准确率是：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-21.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-21.png"/>
        </a>
       </p>
       <p>
        Kappa指标可以用来衡量我们之前构造的分类器和随机分类器的差异，公式为：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-22.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-22.png"/>
        </a>
       </p>
       <p>
        P(c)表示分类器的准确率，P(r)表示随机分类器的准确率。将之前的结果代入公式：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-23.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-23.png"/>
        </a>
       </p>
       <p>
        0.61要如何解释呢？可以参考下列经验结果：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-24.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-24.png"/>
        </a>
       </p>
       <p>
        <em>
         来源：Landis, JR, Koch, GG. 1977 分类效果评估 生物测量学
        </em>
       </p>
       <p>
        <strong>
         动手实践
        </strong>
       </p>
       <p>
        假设我们开发了一个效果不太好的分类器，用来判断600名大学生所读专业，使用的数据是他们对10部电影的评价。这些大学生的专业类别有计算机科学（cs）、教育学（ed）、英语（eng）、心理学（psych）。以下是该分类器的混淆矩阵，尝试计算出它的Kappa指标并予以解释。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-25.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-25.png"/>
        </a>
       </p>
       <p>
        准确率 = 0.697
       </p>
       <p>
        <strong>
         解答
        </strong>
       </p>
       <p>
        首先，计算列合计和百分比：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-26.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-26.png"/>
        </a>
       </p>
       <p>
        然后根据百分比来填充随机分类器的混淆矩阵：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-27.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-27.png"/>
        </a>
       </p>
       <p>
        准确率 = (8 + 24 + 51 + 92) / 600 = (175 / 600) = 0.292
       </p>
       <p>
        最后，计算Kappa指标：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-28.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-28.png"/>
        </a>
       </p>
       <p>
        这说明分类器的效果还是要好过预期的。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-29.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-29.png"/>
        </a>
       </p>
       <h2>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E4%BC%98%E5%8C%96%E8%BF%91%E9%82%BB%E7%AE%97%E6%B3%95" id="user-content-优化近邻算法">
        </a>
        优化近邻算法
       </h2>
       <p>
        有一种分类器叫“机械记忆分类器（Rote Classifer）”，它会将数据集完整地保存下来，并用来判断某条记录是否存在于数据集中。所以，如果我们只对数据集中的数据进行分类，准确率将是100%。而在现实应用中，这种分类器并不可用，因为我们需要判定某条新的记录属于哪个分类。你可以认为我们上一章中构建的分类器是机械记忆分类器的一种扩展，只是我们不要求新的记录完全对应到数据集中的某一条记录，只要距离最近就可以了。PangNing Tan等人在其机器学习的教科书中写过这样一段话：如果一只动物走起来像鸭子、叫起来像鸭子、而且看起来也像鸭子，那它很有可能就是一只鸭子。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-30.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-30.png"/>
        </a>
       </p>
       <p>
        近邻算法的问题之一是异常数据。还是拿运动员分类举例，不过只看体操和马拉松。假设有一个比较矮也比较轻的人，她是马拉松运动员，这样就会形成以下这张图，横轴是体重，纵轴是身高，其中m表示马拉松，g表示体操：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-31.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-31.png"/>
        </a>
       </p>
       <p>
        可以看到这名特别的马拉松运动员处于体操运动员的群组中。假设我们要对一名新的运动员进行分类，用图中的x表示，可以看到离她最近的运动员是那名特别的马拉松运动员，这样一来这名新的运动员就会被归到马拉松，但实际上她更有可能是一名体操运动员。
       </p>
       <h3>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#knn%E7%AE%97%E6%B3%95" id="user-content-knn算法">
        </a>
        kNN算法
       </h3>
       <p>
        优化方法之一是考察这条新记录周围距离最近的k条记录，而不是只看一条，因此这种方法称为k近邻算法（kNN）。每个近邻都有投票权，程序会将新记录判定为得票数最多的分类。比如说，我们使用三个近邻（k = 3），其中两条记录属于体操，一条记录属于马拉松，那我们会判定x为体操。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-32.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-32.png"/>
        </a>
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-33.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-33.png"/>
        </a>
       </p>
       <p>
        因此，我们在判定一条记录的具体分类时可以用这种投票的方法。如果两个分类的票数相等，就随机选取一个。但对于需要预测具体数值的情形，比如一个人对Funky Meters乐队的评分，我们可以计算k个近邻的距离加权平均值。举个例子，我们需要预测Ben对Funky Meters的喜好程度，他的三个近邻分别是Sally、Tara、和Jade。下表是这三个人离Ben的距离，以及他们对Funky Meters的评分：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-34.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-34.png"/>
        </a>
       </p>
       <p>
        可以看到，Sally离Ben最近，她给Funky Meters的评分是4。在计算平均值的时候，我希望距离越近的用户影响越大，因此可以对距离取倒数，从而得到下表：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-35.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-35.png"/>
        </a>
       </p>
       <p>
        下面，我们把所有的距离倒数除以距离倒数的和（0.2 + 0.1 + 0.067 = 0.367），从而得到评分的权重：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-36.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-36.png"/>
        </a>
       </p>
       <p>
        我们可以注意到两件事情：权重之和是1；原始数据中，Sally的距离是Tara的二分之一，这点在权重中体现出来了。最后，我们求得平均值，也即预测Ben对Funky Meters的评分：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-37.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-37.png"/>
        </a>
       </p>
       <p>
        <strong>
         动手实践
        </strong>
       </p>
       <p>
        我们想要预测Sofia对爵士钢琴手Hiromi的评分，以下是她三个近邻的距离和评分：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-38.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-38.png"/>
        </a>
       </p>
       <p>
        <strong>
         解答
        </strong>
       </p>
       <p>
        第一步，计算距离的倒数：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-39.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-39.png"/>
        </a>
       </p>
       <p>
        第二步，计算权重（距离倒数之和为0.475）：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-40.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-40.png"/>
        </a>
       </p>
       <p>
        第三步，预测评分：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-41.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-411.png"/>
        </a>
       </p>
       <h2>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E6%96%B0%E7%9A%84%E6%95%B0%E6%8D%AE%E9%9B%86%E6%96%B0%E7%9A%84%E6%8C%91%E6%88%98" id="user-content-新的数据集新的挑战">
        </a>
        新的数据集，新的挑战！
       </h2>
       <p>
        是时候使用新的数据集了——比马印第安人糖尿病数据集，由美国国家糖尿病、消化和肾脏疾病研究所提供。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-42.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-42.png"/>
        </a>
       </p>
       <p>
        令人惊讶的是，超过30%的比马人患有糖尿病，而全美的糖尿病患者比例是8.3%，中国只有4.2%。
       </p>
       <p>
        数据集中的一条记录代表一名21岁以上的比马女性，她们分类两类：五年内查出患有糖尿病，以及没有得病。共选取了8个特征：
       </p>
       <ol class="task-list">
        <li>
         怀孕次数；
        </li>
        <li>
         口服葡萄糖耐量实验两小时后的血浆葡萄糖浓度；
        </li>
        <li>
         舒张压（mm Hg）；
        </li>
        <li>
         三头肌皮褶厚度（mm）；
        </li>
        <li>
         血清胰岛素（mu U/ml）；
        </li>
        <li>
         身体质量指数（BMI）：体重（公斤）除以身高（米）的平方；
        </li>
        <li>
         糖尿病家谱；
        </li>
        <li>
         年龄（岁）。
        </li>
       </ol>
       <p>
        以下是示例数据，最后一列的0表示没有糖尿病，1表示患有糖尿病：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-43.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-43.png"/>
        </a>
       </p>
       <p>
        比如说，第一条记录表示一名生过两次小孩的女性，她的血糖浓度是99，舒张压是52，等等。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-44.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-44.png"/>
        </a>
       </p>
       <p>
        <strong>
         实践[1]
        </strong>
       </p>
       <p>
        本书提供了两份数据集：
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/code/chapter-5/pimaSmall.zip">
         pimaSmall.zip
        </a>
        和
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/code/chapter-5/pima.zip">
         pima.zip
        </a>
        。前者包含100条记录，后者包含393条记录，都已经等分成了10个文件（10个桶）。我用前面实现的近邻算法计算了pimaSmall数据集，得到的结果如下：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-45.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-45.png"/>
        </a>
       </p>
       <p>
        <em>
         提示：代码中的heapq.nsmallest(n, list)会返回n个最小的项。
         <a href="https://docs.python.org/2/library/heapq.html">
          heapq
         </a>
         是Python内置的优先队列类库。
        </em>
       </p>
       <p>
        你的任务是实现kNN算法。首先在类的init函数中添加参数k：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d44d1123129767" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-st"&gt;def&lt;/span&gt; &lt;span class="pl-en"&gt;&lt;span class="pl-s3"&gt;__init__&lt;/span&gt;&lt;/span&gt;(&lt;span class="pl-vpf"&gt;self&lt;/span&gt;, &lt;span class="pl-vpf"&gt;bucketPrefix&lt;/span&gt;, &lt;span class="pl-vpf"&gt;testBucketNumber&lt;/span&gt;, &lt;span class="pl-vpf"&gt;dataFormat&lt;/span&gt;, &lt;span class="pl-vpf"&gt;k&lt;/span&gt;):
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d44d1123129767-1">
                1
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d44d1123129767-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 def
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 __init__
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 testBucketNumber
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 dataFormat
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 k
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0034 seconds] -->
       </div>
       <p>
        knn函数的签名应该是：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d44da196935337" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-st"&gt;def&lt;/span&gt; &lt;span class="pl-en"&gt;knn&lt;/span&gt;(&lt;span class="pl-vpf"&gt;self&lt;/span&gt;, &lt;span class="pl-vpf"&gt;itemVector&lt;/span&gt;):
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d44da196935337-1">
                1
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d44da196935337-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 def
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 knn
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 itemVector
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0019 seconds] -->
       </div>
       <p>
        它会使用到
        <code>
         self.k
        </code>
        （记得在init函数中保存这个值），它的返回值是0或1。此外，在进行十折交叉验证（tenFold函数）时也要传入k参数。
       </p>
       <p>
        <strong>
         解答
        </strong>
       </p>
       <p>
        init函数的修改很简单：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d44e0121453200" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-st"&gt;def&lt;/span&gt; &lt;span class="pl-en"&gt;&lt;span class="pl-s3"&gt;__init__&lt;/span&gt;&lt;/span&gt;(&lt;span class="pl-vpf"&gt;self&lt;/span&gt;, &lt;span class="pl-vpf"&gt;bucketPrefix&lt;/span&gt;, &lt;span class="pl-vpf"&gt;testBucketNumber&lt;/span&gt;, &lt;span class="pl-vpf"&gt;dataFormat&lt;/span&gt;, &lt;span class="pl-vpf"&gt;k&lt;/span&gt;):
    &lt;span class="pl-v"&gt;self&lt;/span&gt;.k &lt;span class="pl-k"&gt;=&lt;/span&gt; k
    ...
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d44e0121453200-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44e0121453200-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44e0121453200-3">
                3
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d44e0121453200-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 def
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 __init__
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 testBucketNumber
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 dataFormat
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 k
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44e0121453200-2">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 k
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-i">
                 k
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44e0121453200-3">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-sy">
                 .
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0043 seconds] -->
       </div>
       <p>
        knn函数的实现是：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d44e6245941156" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-st"&gt;def&lt;/span&gt; &lt;span class="pl-en"&gt;knn&lt;/span&gt;(&lt;span class="pl-vpf"&gt;self&lt;/span&gt;, &lt;span class="pl-vpf"&gt;itemVector&lt;/span&gt;):
    &lt;span class="pl-s1"&gt;&lt;span class="pl-pds"&gt;"""&lt;/span&gt;使用kNN算法判断itemVector所属类别&lt;span class="pl-pds"&gt;"""&lt;/span&gt;&lt;/span&gt;
    &lt;span class="pl-c"&gt;# 使用heapq.nsmallest来获得k个近邻&lt;/span&gt;
    neighbors &lt;span class="pl-k"&gt;=&lt;/span&gt; heapq.nsmallest(&lt;span class="pl-v"&gt;self&lt;/span&gt;.k,
                                [(&lt;span class="pl-v"&gt;self&lt;/span&gt;.manhattan(itemVector, item[&lt;span class="pl-c1"&gt;1&lt;/span&gt;]), item)
                                 &lt;span class="pl-k"&gt;for&lt;/span&gt; item &lt;span class="pl-k"&gt;in&lt;/span&gt; &lt;span class="pl-v"&gt;self&lt;/span&gt;.data])
    &lt;span class="pl-c"&gt;# 每个近邻都有投票权&lt;/span&gt;
    results &lt;span class="pl-k"&gt;=&lt;/span&gt; {}
    &lt;span class="pl-k"&gt;for&lt;/span&gt; neighbor &lt;span class="pl-k"&gt;in&lt;/span&gt; neighbors: 
        theClass &lt;span class="pl-k"&gt;=&lt;/span&gt; neighbor[&lt;span class="pl-c1"&gt;1&lt;/span&gt;][&lt;span class="pl-c1"&gt;0&lt;/span&gt;]
        results.setdefault(theClass, &lt;span class="pl-c1"&gt;0&lt;/span&gt;)
        results[theClass] &lt;span class="pl-k"&gt;+=&lt;/span&gt; &lt;span class="pl-c1"&gt;1&lt;/span&gt;
    resultList &lt;span class="pl-k"&gt;=&lt;/span&gt; &lt;span class="pl-s3"&gt;sorted&lt;/span&gt;([(i[&lt;span class="pl-c1"&gt;1&lt;/span&gt;], i[&lt;span class="pl-c1"&gt;0&lt;/span&gt;]) &lt;span class="pl-k"&gt;for&lt;/span&gt; i &lt;span class="pl-k"&gt;in&lt;/span&gt; results.items()], &lt;span class="pl-vpf"&gt;reverse&lt;/span&gt;&lt;span class="pl-k"&gt;=&lt;/span&gt;&lt;span class="pl-c1"&gt;True&lt;/span&gt;)
    &lt;span class="pl-c"&gt;# 获取得票最高的分类&lt;/span&gt;
    maxVotes &lt;span class="pl-k"&gt;=&lt;/span&gt; resultList[&lt;span class="pl-c1"&gt;0&lt;/span&gt;][&lt;span class="pl-c1"&gt;0&lt;/span&gt;]
    possibleAnswers &lt;span class="pl-k"&gt;=&lt;/span&gt; [i[&lt;span class="pl-c1"&gt;1&lt;/span&gt;] &lt;span class="pl-k"&gt;for&lt;/span&gt; i &lt;span class="pl-k"&gt;in&lt;/span&gt; resultList &lt;span class="pl-k"&gt;if&lt;/span&gt; i[&lt;span class="pl-c1"&gt;0&lt;/span&gt;] &lt;span class="pl-k"&gt;==&lt;/span&gt; maxVotes]
    &lt;span class="pl-c"&gt;# 若得票相等则随机选取一个&lt;/span&gt;
    answer &lt;span class="pl-k"&gt;=&lt;/span&gt; random.choice(possibleAnswers)
    &lt;span class="pl-k"&gt;return&lt;/span&gt;(answer)
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d44e6245941156-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44e6245941156-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44e6245941156-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44e6245941156-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44e6245941156-5">
                5
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44e6245941156-6">
                6
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44e6245941156-7">
                7
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44e6245941156-8">
                8
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44e6245941156-9">
                9
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44e6245941156-10">
                10
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44e6245941156-11">
                11
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44e6245941156-12">
                12
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44e6245941156-13">
                13
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44e6245941156-14">
                14
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44e6245941156-15">
                15
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44e6245941156-16">
                16
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44e6245941156-17">
                17
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44e6245941156-18">
                18
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44e6245941156-19">
                19
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d44e6245941156-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 def
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 knn
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 itemVector
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44e6245941156-2">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-pds"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 ""
                </span>
                <span class="crayon-s">
                 "&lt;/span&gt;使用kNN算法判断itemVector所属类别&lt;span class="
                </span>
                <span class="crayon-v">
                 pl
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-i">
                 pds
                </span>
                <span class="crayon-s">
                 "&gt;"
                </span>
                <span class="crayon-s">
                 ""
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44e6245941156-3">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 使用heapq.nsmallest来获得k个近邻&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44e6245941156-4">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 neighbors
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 heapq
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 nsmallest
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 k
                </span>
                <span class="crayon-sy">
                 ,
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44e6245941156-5">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 manhattan
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 itemVector
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 item
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 item
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44e6245941156-6">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 item
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-v"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 self
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44e6245941156-7">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 每个近邻都有投票权&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44e6245941156-8">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44e6245941156-9">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 neighbor
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 neighbors
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44e6245941156-10">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 theClass
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 neighbor
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44e6245941156-11">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 setdefault
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 theClass
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44e6245941156-12">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 theClass
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44e6245941156-13">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 resultList
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 sorted
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 items
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 reverse
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 True
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44e6245941156-14">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 获取得票最高的分类&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44e6245941156-15">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 maxVotes
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 resultList
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44e6245941156-16">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 possibleAnswers
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 resultList
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 if
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 maxVotes
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44e6245941156-17">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-p">
                 # 若得票相等则随机选取一个&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44e6245941156-18">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 answer
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 random
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 choice
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 possibleAnswers
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44e6245941156-19">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 return
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 answer
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0210 seconds] -->
       </div>
       <p>
        对tenFold函数的改动如下：
       </p>
       <div class="highlight highlight-python">
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57685fc1d44ef013270629" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           &lt;span class="pl-st"&gt;def&lt;/span&gt; &lt;span class="pl-en"&gt;tenfold&lt;/span&gt;(&lt;span class="pl-vpf"&gt;bucketPrefix&lt;/span&gt;, &lt;span class="pl-vpf"&gt;dataFormat&lt;/span&gt;, &lt;span class="pl-vpf"&gt;k&lt;/span&gt;):
    results &lt;span class="pl-k"&gt;=&lt;/span&gt; {}
    &lt;span class="pl-k"&gt;for&lt;/span&gt; i &lt;span class="pl-k"&gt;in&lt;/span&gt; &lt;span class="pl-s3"&gt;range&lt;/span&gt;(&lt;span class="pl-c1"&gt;1&lt;/span&gt;, &lt;span class="pl-c1"&gt;11&lt;/span&gt;):
        c &lt;span class="pl-k"&gt;=&lt;/span&gt; Classifier(bucketPrefix, i, dataFormat, k)
        ...
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57685fc1d44ef013270629-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44ef013270629-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44ef013270629-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57685fc1d44ef013270629-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-57685fc1d44ef013270629-5">
                5
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57685fc1d44ef013270629-1">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-st"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 def
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-en"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 tenfold
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 dataFormat
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-vpf"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 k
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44ef013270629-2">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 results
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44ef013270629-3">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-s3"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 range
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-c1"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 11
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57685fc1d44ef013270629-4">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 c
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "pl-k"
                </span>
                <span class="crayon-o">
                 &gt;=
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 Classifier
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 bucketPrefix
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 dataFormat
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 k
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-57685fc1d44ef013270629-5">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-sy">
                 .
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0061 seconds] -->
       </div>
       <p>
        你可以从网站上
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/code/chapter-5/pimaKNN.py">
         下载这些代码
        </a>
        ，不过我的代码并不一定是最优的，仅供参考。
       </p>
       <p>
        <strong>
         实践[2]
        </strong>
       </p>
       <p>
        在分类效果上，究竟是数据量的多少比较重要（即使用pimaSmall和pima数据集的效果），还是更好的算法比较重要（k=1和k=3）？
       </p>
       <p>
        <strong>
         解答
        </strong>
       </p>
       <p>
        以下是比较结果：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-46.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-46.png"/>
        </a>
       </p>
       <p>
        看来增加数据量要比使用更好的算法带来的效果好。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-47.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-47.png"/>
        </a>
       </p>
       <p>
        <strong>
         实践[3]
        </strong>
       </p>
       <p>
        72.519%的准确率看起来不错，但还是用Kappa指数来检验一下吧：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-48.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-48.png"/>
        </a>
       </p>
       <p>
        <strong>
         解答
        </strong>
       </p>
       <p>
        计算合计和比例：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-49.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-49.png"/>
        </a>
       </p>
       <p>
        随机分类器的混淆矩阵：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-50.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-50.png"/>
        </a>
       </p>
       <p>
        随机分类器的正确率：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-51.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-51.png"/>
        </a>
       </p>
       <p>
        Kappa指标：
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-52.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-52.png"/>
        </a>
       </p>
       <p>
        <strong>
         效果一般
        </strong>
       </p>
       <h3>
        <a class="anchor" href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md#%E6%9B%B4%E5%A4%9A%E6%95%B0%E6%8D%AE%E6%9B%B4%E5%A5%BD%E7%9A%84%E7%AE%97%E6%B3%95%E8%BF%98%E6%9C%89%E6%8A%9B%E9%94%9A%E7%9A%84%E5%B7%B4%E5%A3%AB" id="user-content-更多数据更好的算法还有抛锚的巴士">
        </a>
        更多数据，更好的算法，还有抛锚的巴士
       </h3>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-54.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-54.png"/>
        </a>
       </p>
       <p>
        几年前我去参加一个墨西哥城的研讨会，比较特别的是会议的第二天是坐观光巴士旅游，观看黑脉金斑蝶等。这辆巴士比较破旧，中途抛锚了好几次，所以我们一群有着博士学位的人就站在路边一边谈笑，一边等着司机修理巴士。而事实证明这段经历是这次会议最大的收获。其间，我有幸与Eric Brill做了交流，他在词性分类方面有着很高的成就，他的算法比前人要优秀很多，从而使他成为自然语言处理界的名人。我和他谈论了分类器的效果问题，他说实验证明增加数据所带来的效果要比改进算法来得大。事实上，如果仍沿用老的词性分类算法，而仅仅增加训练集的数据量，效果很有可能比他现有的算法更好。当然，他不可能通过收集更多的数据来获得一个博士学位，但如果如果你的算法能够取得哪怕一点点改进，也足够了。
       </p>
       <p>
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/img/chapter-5/chapter-5-53.png" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2015/01/chapter-5-53.png"/>
        </a>
       </p>
       <p>
        当然，这并不是说你就不需要挑选出更好的算法了，我们之前也看到了好的算法所带来的效果也是惊人的。但是如果你只是想解决一个问题，而非发表一篇论文，那增加数据量会更经济一些。
       </p>
       <p>
        所以，在认同数据量多寡的重要影响后，我们仍将继续学习各种算法。
       </p>
       <p>
        <strong>
         人们使用kNN算法来做以下事情：
        </strong>
       </p>
       <ul class="task-list">
        <li>
         在亚马逊上推荐商品
        </li>
        <li>
         评估用户的信用
        </li>
        <li>
         通过图像分析来分类路虎车型
        </li>
        <li>
         人像识别
        </li>
        <li>
         分析照片中人物的性别
        </li>
        <li>
         推荐网页
        </li>
        <li>
         推荐旅游套餐
        </li>
       </ul>
       <p>
        英文出处：
        <a href="http://guidetodatamining.com/chapter-5">
         http://guidetodatamining.com/chapter-5
        </a>
       </p>
       <p>
        原文出处：
        <a href="https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md">
         https://github.com/jizhang/guidetodatamining/blob/master/chapter-5.md
        </a>
       </p>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/20824.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/09/t018630756a7e263b33-300x165.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/20824.html" rel="bookmark" title="如何判断一笔交易是否属于欺诈？你只是需要一点数据挖掘">
         如何判断一笔交易是否属于欺诈？你只是需要一点数据挖掘
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/20679.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/09/t010e3a70fbcfef2c12-300x101.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/20679.html" rel="bookmark" title="一篇文章带你认识“高大上”的图数据挖掘">
         一篇文章带你认识“高大上”的图数据挖掘
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/20167.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/07/t0170189d0bb57172e9_副本.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/20167.html" rel="bookmark" title="浅谈金融行业的数据挖掘之道">
         浅谈金融行业的数据挖掘之道
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/19877.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/07/t01d360f079b2c02f4d.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/19877.html" rel="bookmark" title="想入门机器学习、数据挖掘，我该怎么做？">
         想入门机器学习、数据挖掘，我该怎么做？
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <!-- If comments are open, but there are no comments. -->
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F8591.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/8591.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/8591.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>